<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org/extras/dialect"
      layout:decorate="layout/layout"
>
<head>
	<title>登录</title>
	<meta charset="utf-8"/>
	<link rel="stylesheet" href="../../static/asset/css/bootstrap.min.css" th:href="@{/asset/css/bootstrap.min.css}"/>
	<link rel="stylesheet" href="../../static/asset/css/base.min.css" th:href="@{/asset/css/base.min.css}"/>
	<link rel="stylesheet" href="../../static/asset/css/common/front.css" th:href="@{/asset/css/common/front.css}"/>
	<link rel="stylesheet" href="../../static/asset/css/back/login.css" th:href="@{/asset/css/back/login.css}"/>
</head>
<body>
<div layout:fragment="content" class="wrapper login-wrapper">
	<div class="login-container ">
		<form th:action="@{/admin/login}" method="post" class="login-form ">
			<div class="logo-name text-center mb-5">账号密码登录</div>

			<div class="alert alert-danger" th:if="${param.error}">
				<i class="fa fa-times-circle"></i>
				<th:block th:text="#{user.login.usernameNotFound}">Invalid username and password.</th:block>
			</div>
			<div class="alert alert-info" th:if="${param.logout}">
				<i class="fa fa-info-circle"></i>
				<th:block th:text="#{user.login.loggedOut}">You have been logged out.</th:block>
			</div>
			<div class="alert alert-danger" th:if="${param.invalid}">
				<i class="fa fa-times-circle"></i>
				<th:block>当前会话已失效，请重新登录</th:block>
			</div>
			<div class="alert alert-danger" th:if="${param.expired}">
				<i class="fa fa-times-circle"></i>
				<th:block>该帐号已登录，请先退出后重试</th:block>
			</div>

			<div class="form-group">
				<input name="username" type="text" class="form-control" placeholder="账号" th:placeholder="#{user.info.username}">
			</div>
			<div class="form-group">
				<input name="password" type="password" class="form-control" placeholder="密码" th:placeholder="#{user.info.password}">
			</div>

			<div class="form-check">
				<label class="custom-control custom-checkbox">
					<input type="checkbox" class="custom-control-input">
					<span class="custom-control-indicator"></span>
					<span class="custom-control-description" th:text="#{user.login.remember}">记住我</span>
				</label>
			</div>

			<div class="form-group">
				<input type="submit" class="btn btn-block btn-primary" value="登录" th:value="#{user.login}">
			</div>
		</form>
	</div>
</div>

<th:block layout:fragment="script">
	<script type="text/javascript" src="../../static/asset/js/base.min.js" th:src="@{/asset/js/base.min.js}"></script>
	<script type="text/javascript" src="../../static/asset/js/app.js" th:src="@{/asset/js/app.js}"></script>
</th:block>
</body>
</html>
